package cn.tedu.day01.ssm.service.impl;

import cn.tedu.day01.ssm.service.EmpService;
import cn.tedu.day01.ssm.mapper.EmpMapper;
import cn.tedu.day01.ssm.pojo.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;


@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    @Override
    public List<Emp> queryAllEmps() {
        return empMapper.findAll();
    }

    @Override
    public int insertEmp(Emp emp) {
        return empMapper.addEmp(emp);
    }
}
